﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Utils.EasyUI.Layouts;

namespace Utils.Test
{
    [TestClass]
    public class UnitTest1
    {
        /// <summary>
        /// 布局选项
        /// </summary>
        private LayoutOption _option;

        /// <summary>
        /// 测试初始化
        /// </summary>
        [TestInitialize]
        public void TestInit()
        {
            _option = new LayoutOption();
        }

        /// <summary>
        /// 输出默认选项
        /// </summary>
        [TestMethod]
        public void Test_Default()
        {
            var st = _option.ToString();

            Assert.AreEqual("class=\"easyui-layout\"", st);
        }

        /// <summary>
        /// 设置自适应布局
        /// </summary>
        [TestMethod]
        public void TestFit()
        {
            _option = new LayoutOption(true);
            Assert.AreEqual("class=\"easyui-layout\" data-options=\"fit:true\"", _option.ToString());
        }
    }
}